@page
@model AppPrepayModel
@{
    ViewData["Title"] = "App下单";
}
<nav aria-label="breadcrumb">
    <ol class="breadcrumb">
        <li class="breadcrumb-item">
            <a asp-page="/Index">首页</a>
        </li>
        <li class="breadcrumb-item">
            <a asp-page="/WeChatPay/Index">微信支付</a>
        </li>
        <li class="breadcrumb-item">
            <a asp-page="/WeChatPay/Payments/Index">支付产品</a>
        </li>
        <li class="breadcrumb-item active" aria-current="page">@ViewData["Title"]</li>
    </ol>
</nav>
<div class="card mb-3">
    <div class="card-header">
        @ViewData["Title"]
    </div>
    <div class="card-body">
        <form method="post">
            <div class="mb-3">
                <label class="form-label" asp-for="Input.AppId"></label>
                <input class="form-control" asp-for="Input.AppId"/>
            </div>
            <div class="mb-3">
                <label class="form-label" asp-for="Input.MchId"></label>
                <input class="form-control" asp-for="Input.MchId"/>
            </div>
            <div class="mb-3">
                <label class="form-label" asp-for="Input.Description"></label>
                <input class="form-control" asp-for="Input.Description"/>
            </div>
            <div class="mb-3">
                <label class="form-label" asp-for="Input.OutTradeNo"></label>
                <input class="form-control" asp-for="Input.OutTradeNo"/>
            </div>
            <div class="mb-3">
                <label class="form-label" asp-for="Input.NotifyUrl"></label>
                <input class="form-control" asp-for="Input.NotifyUrl"/>
            </div>
            <div class="mb-3">
                <label class="form-label" asp-for="Input.Amount.Total"></label>
                <input class="form-control" asp-for="Input.Amount.Total"/>
            </div>
            <button class="btn btn-primary mb-3" type="submit">提交请求</button>
        </form>
        <hr/>
        @if (ViewData["response"] is string response && !string.IsNullOrEmpty(response))
        {
            <div class="mb-3">
                <label class="form-label">应答</label>
                <textarea class="form-control" rows="10">@response</textarea>
            </div>
        }
        @if (ViewData["parameter"] is string parameter && !string.IsNullOrEmpty(parameter))
        {
            <div class="mb-3">
                <label class="form-label">App调起支付-请求参数</label>
                <textarea class="form-control" rows="10">@parameter</textarea>
            </div>
        }
    </div>
</div>

@section scripts {
    @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
}
